<html>
 <head>
	<title>[var.TITLE]</title>
	<link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
	<link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">	
	<script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>	
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>	
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
		<tr height="100%">
			<td>
			<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
				<tr valign="top">
					<td width="100%">
						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="FacetHeaderContent" align="left">.:Memorial Transaction Lookup:. </td>
							</tr>
						</table>

						<table border="0" cellspacing="0" cellpadding="5" width="100%">
							<tr>
								<td class="contentTitle">
								Menu
								</td>
							</tr>
							<tr>
								<td class="content2">
								<table cellspacing="2" cellpadding="0">
								 <tr>
								   <td>
								     <input type="button" name="Action" value="Save & Exit" class="button" onClick="SaveAndExit();self.close();">
								   </td>
								   <td>								    
								   </td>
								 </tr>
								</table>
								</td>
							</tr>

							<tr>
								<td class="content2">
									<table border="0" cellspacing="0" cellpadding="0">
									<form method="post" action="[var.FileName]?PageMode=MemoList">
										<tr>
											<td class="fieldCaption">Memorial Code</td>
											<td class="fieldCaption">:</td>
											<td>
											<input type="text" name="memorialCodeSearch" size="10" maxlength="50" class="input" value="[var.FCode]">
											</td>
										</tr>
										<tr>
											<td class="menuHeader"></td>
											<td class="menuHeader"></td>
											<td align="right">
											<input type="submit" name="Action" value="Search" class="button" >
											</td>
										</tr>
									</form>
									</table>								
								</td>
							</tr>
							<tr>
								<td>
								</td>
							</tr>														
							<tr>
								<td >&nbsp;</td>
							</tr>							
						</table>					
					
						<table border="0" cellspacing="0" cellpadding="0" width="100%">
						    <tr>
						      <td>
									<table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="left">
									<form method=post name="[var.HTMLGridList]" action="[var.FileName]?FormName=MemorialTransForm">
									  <tr>
									  	<td nowrap class="FacetColumnTD" align="center"></td>
									  	<td nowrap class="FacetColumnTD" align="right">No.</td>
									  	<td nowrap class="FacetColumnTD" align="center">Trans No.</td>
									  	<td nowrap class="FacetColumnTD" align="center">No. Ref</td>
									    <td nowrap class="FacetColumnTD" align="center">Debtur</td>
									    <td nowrap class="FacetColumnTD" align="center">Name</td>
									    <td nowrap class="FacetColumnTD" align="center">Curr</td>
									    <td nowrap class="FacetColumnTD" align="center">Amount</td>
									  </tr>

									  <tr>
									  	<td class="FacetDataTD" align="center">
                                         <script>
                                             var snobkt[blg.#]  = "[blg.nobkt]";
                                             var suraian[blg.#] = "[blg.uraian;htmlconv=yes]";
                                             var snoref[blg.#]  = "[blg.noref;htmlconv=yes]";
                                             var sdebtur[blg.#] = "[blg.debtur]";
                                             var sdebnam[blg.#] = "[blg.debnam]";
                                             var sjumlah[blg.#] = "[blg.total_hutang;frm='0,000.00']";
                                             var sdk[blg.#]     = "[blg.dk]";
                                             var kdact[blg.#]   = "[blg.kdact]";
                                             var skada[blg.#]   = "[blg.skada]";
                                         </script>
									  	<input type="checkbox" id="txtCheck[blg.#]" name="txtCheck[blg.#]" value="[blg.nobkt]" class="inputRadio" onclick="TransferData (this.checked,suraian[blg.#],snobkt[blg.#],sdebtur[blg.#],sdebnam[blg.#],sjumlah[blg.#],sdk[blg.#],skada[blg.#],snoref[blg.#],kdact[blg.#])">
									  	</td>
									  	<td class="FacetDataTD" align="center">[blg.#]</td>
									    <td class="FacetDataTD">[blg.nobkt]</td>
									    <td class="FacetDataTD">[blg.nobkta]</td>
									    <td class="FacetDataTD">[blg.debtur]</td>
									    <td class="FacetDataTD">[blg.debnam;block=tr;]</td>
									    <td class="FacetDataTD" align="center">[blg.curr;]</td>
									    <td class="FacetDataTD" align="right">[blg.total_hutang;frm='0,000.00']</td>
									  </tr>

									  <tr>
									    <td colspan="9" class="FacetDataTD">[blg;block=tr;nodata]No records</td>
									  </tr>

									  <tr>
									    <td colspan="9" nowrap class="FacetColumnTD">[tbs_check.1;block=tr;if [var.RecCnt]!=0]
											<table border="0" align="left" cellpadding="0" cellspacing="0">
											  <tr align="center">[tbs_check.1;block=table;if [var.RecCnt]!=0]
											    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.first;endpoint;friend2=a]&PageMode=MemoList&memorialCodeSearch=[var.FCode]&debtur=[var.FDebtur]&transDate=[var.FDate]">|&lt;</a></td>
											    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.prev;endpoint;friend2=a]&PageMode=MemoList&memorialCodeSearch=[var.FCode]&debtur=[var.FDebtur]&transDate=[var.FDate]">&lt;</a></td>
											    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.page;block=td]&PageMode=MemoList&memorialCodeSearch=[var.FCode]&debtur=[var.FDebtur]&transDate=[var.FDate]">[nv.page]</a></td>
											    <td width="16" bgcolor="#B7B3B7"><strong>[nv.page;block=td;currpage]</strong></td>
											    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.next;endpoint;friend2=a]&PageMode=MemoList&memorialCodeSearch=[var.FCode]&debtur=[var.FDebtur]&transDate=[var.FDate]">&gt;</a></td>
											    <td width="16" class="FacetColumnTD"><a href="[sys.script_name]?PageNum=[nv.last;endpoint;friend2=a]&PageMode=MemoList&memorialCodeSearch=[var.FCode]&debtur=[var.FDebtur]&transDate=[var.FDate]">&gt;|</a></td>
											  </tr>
											</table>									    
									    </td>
									  </tr>
									  </form>
									</table>
						<!-- GRID SECTION -->												 
						       </td>						      
						 	</tr>
						 	<tr>
						 	  <td>
					 	  
						 	  &nbsp;
						 	  </td>
						 	</tr>
							</table>
					</td>
				</tr>
			</table>

			</td>
		</tr>
 	</table>
 </body>
 <script>
 
 var isFound;
 var TotalGrid = [var.RecCnt]; 
 var Debtur,Debnam;
 
 function TransferData (checkedstat,uraian,nobkt,debtur,debnam,jumlah,dk,skada,noref,kdact) {
//	 var CurrentIdx = Locator (uraian, nobkt, noref);
	 var CurrentIdx = opener.IdxCounter;

   opener.DataGrid[CurrentIdx] 		= new Object();
	 opener.DataGrid[CurrentIdx].mod       = 'MT';
	 opener.DataGrid[CurrentIdx].noref     = noref;
	 opener.DataGrid[CurrentIdx].uraian     = uraian;
	 opener.DataGrid[CurrentIdx].norefnd   = noref;
	 opener.DataGrid[CurrentIdx].amount    = jumlah;
	 opener.DataGrid[CurrentIdx].skada     = skada;
	 opener.DataGrid[CurrentIdx].dk        = 'D';
	 opener.DataGrid[CurrentIdx].nobkt     = nobkt;
	 opener.DataGrid[CurrentIdx].kdact     = kdact;
   //alert(opener.DataGrid.length);
	 if (!checkedstat) opener.DataGrid[CurrentIdx].deleted = true;
	 else opener.DataGrid[CurrentIdx].deleted = false;
	 //if (isFound==false) 
	 opener.IdxCounter++;
	 Debtur = debtur;
	 Debnam = debnam;
 }

 function SaveAndExit() {
	opener.SaveAndExit(Debtur,Debnam);
 }
 
 function Locator (uraian, nobkt, noref) {
	 var x=0;	 
	 isFound = false;
     if (opener.DataGrid.length==0) return x;
	 for (x=0;x<opener.IdxCounter;x++) {
		if (opener.DataGrid.length==0) break;
		if ((opener.DataGrid[x].noref==noref)) {
			break;
			isFound = true;
		}
	 }	 
	 return x;
 }
 
 </script>
</html>
